import http from '@/common/js/httpRequest'
//获取检验小组list
export function getGroupList (params) {
  return http({
    method: 'get',
    url: '/api/base/inspection/group/list',
    params
  })
}
//新增或修改检验组
export function saveOrUpdateGroup (data) {
	const url = !data.inspectionGroupId ? '/api/base/inspection/group/save' : '/api/base/inspection/group/update'
  return http({
    method: 'post',
    url: url,
    data
  })
}
//删除检验组
export function deleteGroup (ids) {
  return http({
    method: 'post',
    url: '/api/base/inspection/group/delete',
    data: ids,
    openDefultdata: true
  })
}
//获取检验项分类
export function getCategorysList (params) {
  return http({
    method: 'get',
    url: '/api/base/inspection/category/list',
    params
  })
}
//新增或修改分类
export function saveOrUpdateCategory (data) {
	const url = !data.inspectionCategoryId ? '/api/base/inspection/category/save' : '/api/base/inspection/category/update'
  return http({
    method: 'post',
    url: url,
    data
  })
}
//删除分类
export function deleteCategory (ids) {
  return http({
    method: 'post',
    url: '/api/base/inspection/category/delete',
    data: ids,
    openDefultdata: true
  })
}
